﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Windows.Data;
using System.Globalization;

namespace BadHabit.Factory.Converters {

    [ValueConversion(typeof(int), typeof(string))]
    public class BaseLineConverter : IValueConverter {

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture) {

            int sprintNumber = (int)value;

            if (sprintNumber == 0)
                return  Properties.Resources.Proposal_plan;
            else
                return sprintNumber + "\u00BA " + Properties.Resources.Plan;

        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) {
            return new NotSupportedException();
        }

    }
}
